-- CALC_SKY_FIGHTER_ARMOR
-- 战队的装甲

return function(fighter)
    local armor = fighter.dbase:query("armor", 0);

    -- 装甲+N
    local prop = PropM.combine(fighter, "attrib2", "armor");
    armor = PropM.apply(prop, armor);

    armor = armor + SkyShipSkillM.calcAddon(fighter, "armor", armor);

    armor = armor + SkyPropM.calcAddon(fighter, "armor", armor);

    -- 装甲+N（不参与前面的整体提升）
    prop = PropM.combine(fighter, "add_attrib", "armor");
    armor = PropM.apply(prop, armor);

    -- 降低装甲N
    prop = PropM.combine(fighter, "ship_reduce_attrib", "armor");
    armor = PropM.apply(prop, armor);

    if armor < 0 then
        armor = 0;
    end

    return armor;
end
